Post

Replies

Boosts

Views

Activity

Comment on Return the results of a Spotlight query synchronously from a Swift function
Say the code is in a single main.swift for a command-line tool, it ignores all arguments, & it solely calls a synchronous Swift function on macOS 10.13+ (no Swift 10.15+ Concurrency) that returns a [String] containing the results of the Spotlight query, which is printed to stdout. (I know how to print the results to stdout from a RunLoop, but my real uses need synchronous Spotlight results, so the synchronous requirement remains). How can I write the aforementioned synchronous function?
Apr ’25
Comment on Return the results of a Spotlight query synchronously from a Swift function
Say the code is in a single main.swift for a command-line tool, it ignores all arguments, & it solely calls a synchronous Swift function on macOS 10.13+ (no Swift 10.15+ Concurrency) that returns a [String] containing the results of the Spotlight query, which is printed to stdout. (I know how to print the results to stdout from a RunLoop, but my real uses need synchronous Spotlight results, so the synchronous requirement remains). How can I write the aforementioned synchronous function?
Replies
Boosts
Views
Activity
Apr ’25